1 Public Class FrmCatITEMList
2
3 Private Sub FrmCatITEMList_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
4 MDIDISABLED()
5 End Sub
6
7 Private Sub FrmCatITEMList_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
8 Audit_Trail(xUser_ID, TimeOfDay, "View Supplies and Property File")
9 FillListView(ExecuteSQLQuery("SELECT Catg_ID as 'Category ID', Catg_Name as 'Category Name', Catg_Description as 'Category Description' FROM tbl_Category_File"), lstCategory, 1)
10 lstCategory.Focus()
11 lstCategory.Select()
12 'Call lstCategory_Click()
13 End Sub
14
15 Private Sub lstCategory_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles lstCategory.Click
16 FillListView(ExecuteSQLQuery("SELECT Item_ID as 'Item ID', Item_Name as 'Item Name', Item_Description as 'Description / Item Number', Item_Barcode as 'Barcode', Item_Reorder_Point as 'Reorder Point', Unit_Measure as 'Measure', Item_Price as 'Price' FROM tbl_Category_Item_File WHERE Catg_ID =" & lstCategory.FocusedItem.Text), lstItems, 1)
17 'lstItems.Focus()
18 End Sub
19
20 Private Sub lstCategory_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lstCategory.SelectedIndexChanged
21
22 End Sub
23
24 Private Sub FrmCatITEMList_Resize(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Resize
25 With Me
26 GroupBox1.Width = (.Width - (MDIMain.TSHoldRight.Width / 2)) + 60
27 GroupBox1.Height = .Height - (MDIMain.TSHoldAdvisory.Height + 45)
28 .lstCategory.Width = GroupBox1.Width - 28
29 .lstCategory.Height = (GroupBox1.Height / 2) - 53
30
31 .lstItems.Width = GroupBox1.Width - 28
32 .lstItems.Height = (GroupBox1.Height - lstCategory.Height) - 25
33 End With
34
35 End Sub
36 End Class